{{- define "title" }}
    {{- if (gt .Paginator.PageNumber 1) -}}
        {{ $pageNumber := printf "%v %v %v" (T "prefixPageNumber" ) .Paginator.PageNumber (T "suffixPageNumber" ) }}
        {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} {{ $pageNumber }} - {{ .Site.Title -}}
    {{- else -}}
         {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" }} - {{ .Site.Title -}}
    {{- end -}}
{{- end -}}

{{- define "content" -}}
    <div class="page archive">
        {{- /* Title */ -}}
        <h2 class="single-title">
            {{- .Params.Title | default (T .Section) | default .Section | dict "Some" | T "allSome" -}}
        </h2>

        {{- /* Paginate */ -}}
        {{- /* Paginate is first call on baseof.html */ -}}
        {{- if .Pages -}}
            {{- partial "recentlyUpdated.html" . -}}
            {{- range .Paginator.PageGroups -}}
                <h3 class="group-title">{{ .Key }}</h3>
                {{- range .Pages -}}
                    <article class="archive-item">
                        <a href="{{ .RelPermalink }}" class="archive-item-link">
                            {{- .Title -}}
                        </a>
                        <span class="archive-item-date">
                            {{- $.Site.Params.section.dateFormat | default "01-02" | .Date.Format -}}
                        </span>
                    </article>
                {{- end -}}
            {{- end -}}
            {{- partial "paginator.html" . -}}
        {{- end -}}
    </div>
{{- end -}}
